package com.cooper.resource.download;

import com.cooper.resource.download.DownloadResource.DownloadItem;
import com.cooper.scraper.HttpDownload;

public abstract class DownThread extends Thread {
	
	protected static final int STREAM_BUFFER_SIZE = 1024 * 100;

	protected long downLength = 0;
	protected DownloadStatus downloadStatus;
	protected DownloadItem item = null;
	protected HttpDownload httpDownload;

	public DownThread(HttpDownload httpDownload,DownloadStatus downloadStatus, DownloadItem item) {
		super();
		this.httpDownload = httpDownload;
		this.downloadStatus = downloadStatus;
		this.item = item;
	}
	
	protected abstract void runDownload();

	@Override
	public void run() {
		runDownload();
	}

}